#include "Month.h"

#include <string.h>
#include <fan-llvm/core/Core.h>
#include "Type.h"
#include "UnsupportedErr.h"


Type* Month_classType = NULL;
VTable* Month_classVTable = NULL;


/**********************************************
 *
 * Methods and fields
 *
 **********************************************/


/* Month jan */
Month* Month_jan(void)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Month.jan not implemented yet"));
}


/* Month feb */
Month* Month_feb(void)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Month.feb not implemented yet"));
}


/* Month mar */
Month* Month_mar(void)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Month.mar not implemented yet"));
}


/* Month apr */
Month* Month_apr(void)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Month.apr not implemented yet"));
}


/* Month may */
Month* Month_may(void)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Month.may not implemented yet"));
}


/* Month jun */
Month* Month_jun(void)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Month.jun not implemented yet"));
}


/* Month jul */
Month* Month_jul(void)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Month.jul not implemented yet"));
}


/* Month aug */
Month* Month_aug(void)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Month.aug not implemented yet"));
}


/* Month sep */
Month* Month_sep(void)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Month.sep not implemented yet"));
}


/* Month oct */
Month* Month_oct(void)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Month.oct not implemented yet"));
}


/* Month nov */
Month* Month_nov(void)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Month.nov not implemented yet"));
}


/* Month dec */
Month* Month_dec(void)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Month.dec not implemented yet"));
}


/* Month[] vals */
List* Month_vals(void)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Month.vals not implemented yet"));
}


/* Month increment() */
Month* Month_increment(Month* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Month.increment not implemented yet"));
}


/* Month decrement() */
Month* Month_decrement(Month* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Month.decrement not implemented yet"));
}


/* Int numDays(Int year) */
Int Month_numDays(Month* self, Int year)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Month.numDays not implemented yet"));
}


/* Str toLocale(Str? pattern) */
Str* Month_toLocale_0(Month* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Month.toLocale not implemented yet"));
}


/* Str toLocale(Str? pattern) */
Str* Month_toLocale(Month* self, Str* pattern)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Month.toLocale not implemented yet"));
}


/* Str localeAbbr() */
Str* Month_localeAbbr(Month* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Month.localeAbbr not implemented yet"));
}


/* Str localeFull() */
Str* Month_localeFull(Month* self)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Month.localeFull not implemented yet"));
}


/* Month? fromStr(Str name, Bool checked) */
Month* Month_fromStr_1(Str* name)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Month.fromStr not implemented yet"));
}


/* Month? fromStr(Str name, Bool checked) */
Month* Month_fromStr(Str* name, Bool checked)
{
  exceptionThrow(UnsupportedErr_newWithFormattedMsg("sys::Month.fromStr not implemented yet"));
}


/**********************************************
 *
 * Type-system functions
 *
 **********************************************/


Type* Month_initType(void)
{
  if (Month_classType == NULL)
  {
    Type* baseType = Enum_initType();
    VTable* vtable = Month_initVTable();
    Type* type = Type_new("Month", baseType, vtable, sizeof(Month), sizeof(MonthVTable));
    Type_registerMethodImplementation(type, "decrement", Month_decrement, 0);
    Type_registerMethodImplementation(type, "fromStr", Month_fromStr_1, 1);
    Type_registerMethodImplementation(type, "fromStr", Month_fromStr, 2);
    Type_registerMethodImplementation(type, "increment", Month_increment, 0);
    Type_registerMethodImplementation(type, "localeAbbr", Month_localeAbbr, 0);
    Type_registerMethodImplementation(type, "localeFull", Month_localeFull, 0);
    Type_registerMethodImplementation(type, "numDays", Month_numDays, 1);
    Type_registerMethodImplementation(type, "toLocale", Month_toLocale_0, 0);
    Type_registerMethodImplementation(type, "toLocale", Month_toLocale, 1);
    Type_registerFieldImplementation(type, "apr", Month_apr, NULL);
    Type_registerFieldImplementation(type, "aug", Month_aug, NULL);
    Type_registerFieldImplementation(type, "dec", Month_dec, NULL);
    Type_registerFieldImplementation(type, "feb", Month_feb, NULL);
    Type_registerFieldImplementation(type, "jan", Month_jan, NULL);
    Type_registerFieldImplementation(type, "jul", Month_jul, NULL);
    Type_registerFieldImplementation(type, "jun", Month_jun, NULL);
    Type_registerFieldImplementation(type, "mar", Month_mar, NULL);
    Type_registerFieldImplementation(type, "may", Month_may, NULL);
    Type_registerFieldImplementation(type, "nov", Month_nov, NULL);
    Type_registerFieldImplementation(type, "oct", Month_oct, NULL);
    Type_registerFieldImplementation(type, "sep", Month_sep, NULL);
    Type_registerFieldImplementation(type, "vals", Month_vals, NULL);
    Month_classType = type;
    Month_initStatic();
  }
  return Month_classType;
}


VTable* Month_initVTable(void)
{
  if (Month_classVTable == NULL)
  {
    VTable* vtable = memoryAlloc(sizeof(MonthVTable));
    memcpy(vtable, Enum_initVTable(), sizeof(EnumVTable));
    Month_classVTable = vtable;
  }
  return Month_classVTable;
}


void Month_initStatic(void)
{
}
